package com.link2room.rodimus.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;
import java.util.Date;

/**
 * Created by VegetaKo on 2017/1/3.
 */
@DynamicInsert
@Entity
@Table(name = "mall_order_base")
public class MallOrderBase extends BaseEntity {
    public enum MallOrderBase_{
        orderCode,point,price,amount,memberNo,goodType,sta,expressAddress,expressMan,expressMobile,expressSta,expressProvider,expressNo,
        expressRemark,invoiceTitle,invoiceNo,invoiceRemark,openid,orderType,productCode
    }
    private String orderCode;
    private BigDecimal point;
    private BigDecimal price;
    private Integer amount;
    private String memberNo;
    private String goodType;
    private String sta;
    private String needExpress;
    private String expressAddress;
    private String expressMan;
    private String expressMobile;
    private String expressSta;
    private String expressProvider;
    private String expressNo;
    private String expressRemark;
    private String invoiceTitle;
    private String invoiceNo;
    private String invoiceRemark;
    private String pointPaySta;
    private String moneyPaySta;
    private String moneyPayType;
    private String moneyTaNo;
    private String salesmanNo;
    private String openid;
    private String remark;
    private String goodContant;
    private String needInvoice;
    private Date cancelDate;
    private String orderType;
    private String productCode;

    @Basic
    @Column(name = "order_code", nullable = true, length = 16)
    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    @Basic
    @Column(name = "point", nullable = true)
    public BigDecimal getPoint() {
        return point;
    }

    public void setPoint(BigDecimal point) {
        this.point = point;
    }

    @Basic
    @Column(name = "price", nullable = true, precision = 0)
    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    @Basic
    @Column(name = "amount", nullable = true)
    public Integer getAmount() {
        return amount;
    }

    public void setAmount(Integer amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "member_no", nullable = true, length = 16)
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "good_type", nullable = true, length = 16)
    public String getGoodType() {
        return goodType;
    }

    public void setGoodType(String goodType) {
        this.goodType = goodType;
    }

    @Basic
    @Column(name = "sta", nullable = true, length = 8)
    public String getSta() {
        return sta;
    }

    public void setSta(String sta) {
        this.sta = sta;
    }

    @Basic
    @Column(name = "need_express", nullable = true, length = 8)
    public String getNeedExpress() {
        return needExpress;
    }

    public void setNeedExpress(String needExpress) {
        this.needExpress = needExpress;
    }

    @Basic
    @Column(name = "express_address", nullable = true, length = 256)
    public String getExpressAddress() {
        return expressAddress;
    }

    public void setExpressAddress(String expressAddress) {
        this.expressAddress = expressAddress;
    }

    @Basic
    @Column(name = "express_man", nullable = true, length = 32)
    public String getExpressMan() {
        return expressMan;
    }

    public void setExpressMan(String expressMan) {
        this.expressMan = expressMan;
    }

    @Basic
    @Column(name = "express_mobile", nullable = true, length = 16)
    public String getExpressMobile() {
        return expressMobile;
    }

    public void setExpressMobile(String expressMobile) {
        this.expressMobile = expressMobile;
    }

    @Basic
    @Column(name = "express_sta", nullable = true, length = 8)
    public String getExpressSta() {
        return expressSta;
    }

    public void setExpressSta(String expressSta) {
        this.expressSta = expressSta;
    }

    @Basic
    @Column(name = "express_provider", nullable = true, length = 16)
    public String getExpressProvider() {
        return expressProvider;
    }

    public void setExpressProvider(String expressProvider) {
        this.expressProvider = expressProvider;
    }

    @Basic
    @Column(name = "express_no", nullable = true, length = 32)
    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

    @Basic
    @Column(name = "express_remark", nullable = true, length = 256)
    public String getExpressRemark() {
        return expressRemark;
    }

    public void setExpressRemark(String expressRemark) {
        this.expressRemark = expressRemark;
    }

    @Basic
    @Column(name = "invoice_title", nullable = true, length = 64)
    public String getInvoiceTitle() {
        return invoiceTitle;
    }

    public void setInvoiceTitle(String invoiceTitle) {
        this.invoiceTitle = invoiceTitle;
    }

    @Basic
    @Column(name = "invoice_no", nullable = true, length = 32)
    public String getInvoiceNo() {
        return invoiceNo;
    }

    public void setInvoiceNo(String invoiceNo) {
        this.invoiceNo = invoiceNo;
    }

    @Basic
    @Column(name = "invoice_remark", nullable = true, length = 256)
    public String getInvoiceRemark() {
        return invoiceRemark;
    }

    public void setInvoiceRemark(String invoiceRemark) {
        this.invoiceRemark = invoiceRemark;
    }

    @Basic
    @Column(name = "salesman_no")
    public String getSalesmanNo() {
        return salesmanNo;
    }

    public void setSalesmanNo(String salesmanNo) {
        this.salesmanNo = salesmanNo;
    }
    @Basic
    @Column(name = "openid")
    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "good_contant")
    public String getGoodContant() {
        return goodContant;
    }

    public void setGoodContant(String goodContant) {
        this.goodContant = goodContant;
    }

    @Basic
    @Column(name = "need_invoice")
    public String getNeedInvoice() {
        return needInvoice;
    }

    public void setNeedInvoice(String needInvoice) {
        this.needInvoice = needInvoice;
    }


    @Basic
    @Column(name = "point_pay_sta", nullable = true, length = 8)
    public String getPointPaySta() {
        return pointPaySta;
    }

    public void setPointPaySta(String pointPaySta) {
        this.pointPaySta = pointPaySta;
    }

    @Basic
    @Column(name = "money_pay_sta", nullable = true, length = 8)
    public String getMoneyPaySta() {
        return moneyPaySta;
    }

    public void setMoneyPaySta(String moneyPaySta) {
        this.moneyPaySta = moneyPaySta;
    }

    @Basic
    @Column(name = "money_pay_type", nullable = true, length = 8)
    public String getMoneyPayType() {
        return moneyPayType;
    }

    public void setMoneyPayType(String moneyPayType) {
        this.moneyPayType = moneyPayType;
    }

    @Basic
    @Column(name = "money_ta_no", nullable = true, length = 32)
    public String getMoneyTaNo() {
        return moneyTaNo;
    }

    public void setMoneyTaNo(String moneyTaNo) {
        this.moneyTaNo = moneyTaNo;
    }

    @Basic
    @Column(name = "cancel_date", nullable = true)
    public Date getCancelDate() {
        return cancelDate;
    }

    public void setCancelDate(Date cancelDate) {
        this.cancelDate = cancelDate;
    }
    @Basic
    @Column(name = "order_type", nullable = true)
    public String getOrderType() {
        return orderType;
    }

    public void setOrderType(String orderType) {
        this.orderType = orderType;
    }

    @Basic
    @Column(name = "product_code", nullable = true)
    public String getProductCode() {
        return productCode;
    }

    public void setProductCode(String product_code) {
        this.productCode = product_code;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MallOrderBase that = (MallOrderBase) o;

        if (orderCode != null ? !orderCode.equals(that.orderCode) : that.orderCode != null) return false;
        if (point != null ? !point.equals(that.point) : that.point != null) return false;
        if (price != null ? !price.equals(that.price) : that.price != null) return false;
        if (amount != null ? !amount.equals(that.amount) : that.amount != null) return false;
        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (goodType != null ? !goodType.equals(that.goodType) : that.goodType != null) return false;
        if (sta != null ? !sta.equals(that.sta) : that.sta != null) return false;
        if (needExpress != null ? !needExpress.equals(that.needExpress) : that.needExpress != null) return false;
        if (expressAddress != null ? !expressAddress.equals(that.expressAddress) : that.expressAddress != null)
            return false;
        if (expressMan != null ? !expressMan.equals(that.expressMan) : that.expressMan != null) return false;
        if (expressMobile != null ? !expressMobile.equals(that.expressMobile) : that.expressMobile != null)
            return false;
        if (expressSta != null ? !expressSta.equals(that.expressSta) : that.expressSta != null) return false;
        if (expressProvider != null ? !expressProvider.equals(that.expressProvider) : that.expressProvider != null)
            return false;
        if (expressNo != null ? !expressNo.equals(that.expressNo) : that.expressNo != null) return false;
        if (expressRemark != null ? !expressRemark.equals(that.expressRemark) : that.expressRemark != null)
            return false;
        if (invoiceTitle != null ? !invoiceTitle.equals(that.invoiceTitle) : that.invoiceTitle != null) return false;
        if (invoiceNo != null ? !invoiceNo.equals(that.invoiceNo) : that.invoiceNo != null) return false;
        if (invoiceRemark != null ? !invoiceRemark.equals(that.invoiceRemark) : that.invoiceRemark != null)
            return false;
        if (pointPaySta != null ? !pointPaySta.equals(that.pointPaySta) : that.pointPaySta != null) return false;
        if (moneyPaySta != null ? !moneyPaySta.equals(that.moneyPaySta) : that.moneyPaySta != null) return false;
        if (moneyPayType != null ? !moneyPayType.equals(that.moneyPayType) : that.moneyPayType != null) return false;
        if (moneyTaNo != null ? !moneyTaNo.equals(that.moneyTaNo) : that.moneyTaNo != null) return false;
        if (salesmanNo != null ? !salesmanNo.equals(that.salesmanNo) : that.salesmanNo != null) return false;
        if (openid != null ? !openid.equals(that.openid) : that.openid != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (goodContant != null ? !goodContant.equals(that.goodContant) : that.goodContant != null) return false;
        if (needInvoice != null ? !needInvoice.equals(that.needInvoice) : that.needInvoice != null) return false;
        if (cancelDate != null ? !cancelDate.equals(that.cancelDate) : that.cancelDate != null) return false;
        if (orderType != null ? !orderType.equals(that.orderType) : that.orderType != null) return false;
        return productCode != null ? productCode.equals(that.productCode) : that.productCode == null;
    }

    @Override
    public int hashCode() {
        int result = orderCode != null ? orderCode.hashCode() : 0;
        result = 31 * result + (point != null ? point.hashCode() : 0);
        result = 31 * result + (price != null ? price.hashCode() : 0);
        result = 31 * result + (amount != null ? amount.hashCode() : 0);
        result = 31 * result + (memberNo != null ? memberNo.hashCode() : 0);
        result = 31 * result + (goodType != null ? goodType.hashCode() : 0);
        result = 31 * result + (sta != null ? sta.hashCode() : 0);
        result = 31 * result + (needExpress != null ? needExpress.hashCode() : 0);
        result = 31 * result + (expressAddress != null ? expressAddress.hashCode() : 0);
        result = 31 * result + (expressMan != null ? expressMan.hashCode() : 0);
        result = 31 * result + (expressMobile != null ? expressMobile.hashCode() : 0);
        result = 31 * result + (expressSta != null ? expressSta.hashCode() : 0);
        result = 31 * result + (expressProvider != null ? expressProvider.hashCode() : 0);
        result = 31 * result + (expressNo != null ? expressNo.hashCode() : 0);
        result = 31 * result + (expressRemark != null ? expressRemark.hashCode() : 0);
        result = 31 * result + (invoiceTitle != null ? invoiceTitle.hashCode() : 0);
        result = 31 * result + (invoiceNo != null ? invoiceNo.hashCode() : 0);
        result = 31 * result + (invoiceRemark != null ? invoiceRemark.hashCode() : 0);
        result = 31 * result + (pointPaySta != null ? pointPaySta.hashCode() : 0);
        result = 31 * result + (moneyPaySta != null ? moneyPaySta.hashCode() : 0);
        result = 31 * result + (moneyPayType != null ? moneyPayType.hashCode() : 0);
        result = 31 * result + (moneyTaNo != null ? moneyTaNo.hashCode() : 0);
        result = 31 * result + (salesmanNo != null ? salesmanNo.hashCode() : 0);
        result = 31 * result + (openid != null ? openid.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (goodContant != null ? goodContant.hashCode() : 0);
        result = 31 * result + (needInvoice != null ? needInvoice.hashCode() : 0);
        result = 31 * result + (cancelDate != null ? cancelDate.hashCode() : 0);
        result = 31 * result + (orderType != null ? orderType.hashCode() : 0);
        result = 31 * result + (productCode != null ? productCode.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "MallOrderBase{" +
                "orderCode='" + orderCode + '\'' +
                ", point=" + point +
                ", price=" + price +
                ", amount=" + amount +
                ", memberNo='" + memberNo + '\'' +
                ", goodType='" + goodType + '\'' +
                ", sta='" + sta + '\'' +
                ", needExpress='" + needExpress + '\'' +
                ", expressAddress='" + expressAddress + '\'' +
                ", expressMan='" + expressMan + '\'' +
                ", expressMobile='" + expressMobile + '\'' +
                ", expressSta='" + expressSta + '\'' +
                ", expressProvider='" + expressProvider + '\'' +
                ", expressNo='" + expressNo + '\'' +
                ", expressRemark='" + expressRemark + '\'' +
                ", invoiceTitle='" + invoiceTitle + '\'' +
                ", invoiceNo='" + invoiceNo + '\'' +
                ", invoiceRemark='" + invoiceRemark + '\'' +
                ", pointPaySta='" + pointPaySta + '\'' +
                ", moneyPaySta='" + moneyPaySta + '\'' +
                ", moneyPayType='" + moneyPayType + '\'' +
                ", moneyTaNo='" + moneyTaNo + '\'' +
                ", salesmanNo='" + salesmanNo + '\'' +
                ", openid='" + openid + '\'' +
                ", remark='" + remark + '\'' +
                ", goodContant='" + goodContant + '\'' +
                ", needInvoice='" + needInvoice + '\'' +
                ", cancelDate=" + cancelDate +
                ", orderType='" + orderType + '\'' +
                ", productCode='" + productCode + '\'' +
                '}';
    }
}
